﻿<html DIR="LTR" xmlns:tool="http://www.microsoft.com/tooltip" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
  <head>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8" />
    <META NAME="save" CONTENT="history" />
    <title>Readme_Data Mining Web Controls Library</title>
    
    
    
    <style TYPE="text/css">
body
{
background: #FFFFFF;
color: #000000;
font-family:    Verdana;
font-size: medium;
font-style: normal;
font-weight: normal;
margin-top: 0;
margin-bottom:  0;
margin-left:    0;
margin-right:   0;
width:  100%;
}

div.#mainSection
{
font-size: 70%;
width: 100%;
padding-left:    10;
margin-right: 10;
}

div.#mainBody
{
font-size: 90%;
margin-top: 10;
padding-bottom: 20;
}

div.#header
{
background-color: #D2D2D2;
padding-top:    0;
padding-bottom: 0;
padding-left:   10;
padding-right:  0;
width:          100%;
}

div.#header table
{
border-bottom-color: #C8CDDE;
border-bottom-style: solid;
border-bottom-width: 1;
width:  100%;
}

span.#runningHeaderText
{
color: #003399;
font-size: 90%;
}

span.#nsrTitle
{
/*    color: #003399;*/
font-size: 120%;
font-weight: 600;
}

div.#header table td
{
color: #000000;
font-size: 70%;
margin-top: 0;
margin-bottom:  0;
padding-right: 20;
}

div.#header table tr.#headerTableRow3 td
{
padding-bottom: 2;
padding-top: 5;
}

div.#header table.#bottomTable
{
border-top-color: #FFFFFF;
border-top-style: solid;
border-top-width: 1;
text-align: left;
}

div.#footer
{
font-size: 90%;
margin-top: 0;
margin-bottom:  0;
margin-left:    -5;
margin-right:   0;
padding-top:    2;
padding-bottom: 2;
padding-left:   0;
padding-right:  0;
width:  100%;
}

hr.#footerHR
{
border-bottom-color: #EEEEFF;
border-bottom-style: solid;
border-bottom-width: 1;
border-top-color: C8CDDE;
border-top-style: solid;
border-top-width: 1;
height: 3;
color: #D2D2D2;
}

div.section
{
padding-top:    2;
padding-bottom: 2;
padding-right:  15;
width:  100%;
}

.heading
{
color:          #000000;
font-weight:    bold;
margin-top:     18;
margin-bottom:  8;
}

h1.heading
{
color: #000000;
font-size:  150%;
}

.subHeading
{
color:          #000000;
font-weight:    bold;
font-size:      150%;
margin-bottom:  4;
}

h2.subHeading
{
color:          #000000;
font-weight:    bold;
font-size:      130%;
}
h3.subHeading
{
color:  #000000;
font-size: 125%;
font-weight: bold;
}

h4.subHeading
{
color: #000000;
font-size: 110%;
font-weight: bold;
}

h4.procedureHeading
{
color: #000080;
font-size: 110%;
font-weight: bold;
}

h5.subHeading
{
color: #000000;
font-size: 100%;
font-weight: bold;
}

img
{
padding-bottom: 10;
}

img.toggle
{
border: 0;
margin-right: 5;
padding-bottom: 10;
}

img.copyCodeImage
{
border: 0;
margin: 1;
margin-right: 3;
padding-bottom: 10;
}

img.downloadCodeImage
{
border: 0;
margin-right: 3;
padding-bottom: 10;
}

img.viewCodeImage
{
border: 0;
margin-right: 3;
padding-bottom: 10;
}

img.note
{
border: 0;
margin-right: 3;
padding-bottom: 10;
}

img.#membersOptionsFilterImage
{
border: 0;
margin-left: 10;
vertical-align: middle;
padding-bottom: 10;
}

img.#toggleAllImage
{
margin-left: 4;
vertical-align: middle;
padding-bottom: 10;
}

div.#mainSection table
{
border: 0;
font-size: 100%;
width:  100%;
margin-top: 5px;
margin-bottom: 15px;
}

div.#mainSection table tr
{
vertical-align: top;
}

div.#mainSection table th
{
text-align: left;
background: #D8D8D8;
border-bottom-color: #D8D8D8;
border-bottom-style: solid;
border-bottom-width: 1;
color: #000000;
padding-left: 5;
padding-right: 5;
}

div.#mainSection table td
{
background: #F2F2F2;
border-top-color: #D8D8D8;
border-top-style: solid;
border-top-width: 1;
padding-left: 5;
padding-right: 5;
}

div.#mainSection table td.imageCell
{
white-space: nowrap;
}

div.code
{
width: 98%;
}

div.code table
{
border: 0;
font-size: 95%;
margin-bottom: 5;
width: 100%
}

div.code table th
{
text-align: left;
background: #D8D8D8;
border-bottom-color: #D8D8D8;
border-bottom-style: solid;
border-bottom-width: 1;
color: #000000;
font-weight: bold;
padding-left: 5;
padding-right: 5;
}

div.code table td
{
background: #CCCCCC;
border-top-color: #D8D8D8;
border-top-style: solid;
border-top-width: 1;
padding-left: 5;
padding-right: 5;
padding-top: 5;
}

div.alert
{
margin-left: 10;
width: 98%;
}

div.alert table
{
border: 1;
font-size: 100%;
width:  100%;
border: solid 1 #DEDFEF;
}

div.alert table th
{
text-align: left;
background: #D8D8D8;
border-bottom-width: 0;
color: #000000;
padding-left: 5;
padding-right: 5;
border: solid 1 #DEDFEF;
}

div.alert table td
{
background: #FFFFFF;
border-top-color: #D8D8D8;
border-top-style: solid;
border-top-width: 1;
padding-left: 5;
padding-right: 5;
border: solid 1 #DEDFEF;
}

span.copyCode
{
color: #0000ff;
font-size: 90%;
font-weight: normal;
cursor: hand;
float: right;
display: inline;
text-align: right;
}

.downloadCode
{
color: #0000ff;
font-size: 90%;
font-weight: normal;
cursor: hand;
}

.viewCode
{
color: #0000ff;
font-size: 90%;
font-weight: normal;
cursor: hand;
}

div.code pre
{
font-family:    Monospace, Courier New, Courier;
font-size: 105%;
color:  #000000;
}

code
{
font-family:    Monospace, Courier New, Courier;
font-size: 105%;
color:  #000000;
}

dl
{
margin-top: 0;
padding-left:   1;
}

dd
{
margin-bottom:  0;
margin-left:    0;
padding-left:   20;
}

dd p
{
margin-top: 5;
}

ul
{
margin-left: 17;
list-style-type: disc;
}

ul ul
{
margin-bottom: 4;
margin-left: 17;
margin-top: 3;
list-style-type: disc;
}

ol
{
margin-left: 24;
list-style-type: decimal;
}

ol ol
{
margin-left: 24;
margin-top: 3;
list-style-type: lower-alpha;
}

li
{
margin-top: 0;
margin-bottom: 0;
padding-bottom: 0;
padding-top: 0;
margin-left: 5;
}

p
{
margin-bottom: 15;
}

.tip
{
color:  #0000FF;
font-style: italic;
cursor:hand;
text-decoration:underline;
}

.math
{
font-family: Times New Roman;
font-size: 125%
}
.sourceCodeList
{
font-family: Verdana;
font-size: 90%;
}

pre.viewCode
{
width: 100%;
overflow: auto;
}

li:hover table, li.over table
{
background-color: #C0C0C0;
}

li:hover ul, li.over ul
{
background-color: #d2d2d2;
border: 1px solid #000;
display: block;
}
            </style>
  </head>
  <body>
    <!--Topic built:06/04/2008 01:31:57-->

    
    
    
    
    
    
    
    
    
    <div id="header">
      <table width="100%" id="topTable"><tr>
          <td align="left">
            <span id="nsrTitle">Readme_Data Mining Web Controls Library</span>
          </td>
          <td align="right">
            <span id="headfb" class="feedbackhead">
            </span>
          </td>
        </tr></table>
      
      
      
    </div>
    <div id="mainSection">
      <div id="mainBody"><p> 6/4/2008 1:31:57 AM</p>
        
        <font color="DarkGray"> </font><p /> 
        <span id="changeHistory">
        </span>
    <p>
      This sample works only with SQL Server 2005 and SQL Server 2008. It will not work with any version of SQL Server earlier than SQL Server 2005.
    </p>
    <p>Data Mining Web Controls Library is a library intended to extend the data mining user experience in Microsoft SQL Server Analysis Services to the Web. This library provides a lightweight version of the data mining model viewers. Using Data Mining Web Controls, you can browse complex mining models from any computer that has Microsoft Internet Explorer installed.</p>
    <p>The controls are server side. That is, the controls are located in the memory space of a Web server. The Web server can be, but does not have to be, the computer where Analysis Services is installed. However, Internet Information Services (IIS) and ASP.NET 2.0 (and later versions) must be installed and running on the computer where Data Mining Web Controls will be installed.</p>
    <p>The documents and source code associated with each of these samples are located in the C:\Program Files\Microsoft SQL Server\100\Samples\Analysis Services\DataMining\Data Mining Web Controls folder.</p>
  <h1 class="heading">Languages</h1><div id="sectionSection0" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">Transact-SQL and C#</p>
    </content></div><h1 class="heading">Features</h1><div id="sectionSection1" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">The Data Mining Web Controls sample uses the SQL Server Analysis Services features listed in the following table.</p>
      <table width="100%" cellspacing="0" cellpadding="0" border="1" style="background-color: #CCCCCC;" xmlns=""><tr>
            <th>
              Application Area
            </th>
            <th>
              Features
            </th>
          </tr><tr>
          <td>
            <p>DMClusterViewer</p>
          </td>
          <td>
            <p>Clustering Algorithm</p>
          </td>
        </tr><tr>
          <td>
            <p>DMDecisionTreeViewer</p>
          </td>
          <td>
            <p>Decision Trees Algorithm</p>
          </td>
        </tr><tr>
          <td>
            <p>DMNaiveBayesViewer</p>
          </td>
          <td>
            <p>Naïve Bayes Algorithm</p>
          </td>
        </tr><tr>
          <td>
            <p>Overall</p>
          </td>
          <td>
            <p>
              Analysis Services, OLE DB, Transact-SQL, <b>AdventureWorks</b> sample databases</p>
          </td>
        </tr></table>
    </content></div><h1 class="heading">Prerequisites</h1><div id="sectionSection2" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">Before you run this sample, make sure that the following software is installed:</p>
      <ul xmlns=""><li>
          
            Microsoft SQL Server, which includes the following components:<br />
          <ul><li>
              
                SQL Server Database Engine
              <br />
            </li><li>
              
                Analysis Services
              <br />
            </li><li>
              
                SQL Server Management Studio
              <br />
            </li><li>
              
                Business Intelligence Development Studio
              <br />
            </li><li>
              Two sample databases—<b>Adventure Works DW</b> (data warehouse) and <b>AdventureWorks</b> (OLTP)<br />
            </li><li>
              
                Analysis Services Samples<br />
            </li><li>
              Adventure Works DW Analysis Services project, deployed to an instance of Analysis Services<br />
            </li><li>
              
                .NET Framework SDK 2.0 or Microsoft Visual Studio 2005. You can obtain .NET Framework SDK free of charge. For more information, see <b>Installing the .NET Framework Documentation</b> in SQL Server Books Online.<br />
            </li></ul>
        </li></ul>
      <p xmlns="">An updated version of AdventureWorks database is also available for download on the <a href="http://go.microsoft.com/fwlink/?linkid=62796" alt=""><linkText xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">SQL Server Developer Center</linkText></a> Web page.</p>
      <p xmlns="">An updated version of the SQL Server Database Engine samples is also available for download on the <a href="http://go.microsoft.com/fwlink/?linkid=62796" alt=""><linkText xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">SQL Server Developer Center</linkText></a> Web page.</p>
      <div class="alert" xmlns=""><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Note: </th></tr><tr><td>
        SQL Server Business Intelligence Development Studio is not supported on computers that run the Itanium-based platform; the 64-bit development environment is supported on x64-based platforms. SQL Server samples can be modified and run on computers that run either x86 or x64-based platforms when databases used by the samples are deployed on an Itanium-based platform.<p />
      </td></tr></table><p /></div>
    </content></div><h1 class="heading">Building the Sample</h1><div id="sectionSection3" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">Before you build the sample, make sure to install Analysis Services on the computer that is running the Web server. If you cannot install Analysis Services completely, at least install the client connectivity part—in particular MSOLAP, the OLE DB provider for Analysis Services—on the server. The Data Mining Web Controls need this provider to connect to the server that is running Analysis Services and the data mining models.</p>
      <p xmlns="">To build the sample, you will have to do the following tasks:</p>
      <ul xmlns=""><li>
          Install and deploy the Adventure Works DW sample Analysis Services project. This project contains the mining model which will be used in the project.<br />
        </li><li>
          Build and install the Data Mining Web Controls.<br />
        </li></ul>
      <p xmlns="">The following procedures show how to do each of these tasks for the installation.</p>
      <h4 class="procedureHeading" xmlns="">To deploy the mining model</h4><div id="procedureSectionEDBLBHA" class="section" xmlns=""><ol><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">In Windows Explorer, locate C:\Program Files\Microsoft SQL Server\100\Tools\Samples\AdventureWorks Analysis Services Project, open the folder that corresponds to the edition of SQL Server that was installed, and then double-click the Adventure Works.sln file. </p>
              <p xmlns="">The Adventure Works DW project opens in Business Intelligence Development Studio.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">Press F5 to build and deploy the project.</p>
              <div class="alert" xmlns=""><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Note: </th></tr><tr><td>
                Building and deploying the AdventureWorksAS project deploys the mining model to the server.<p />
              </td></tr></table><p /></div>
            </content>
          </li></ol></div>
      <h4 class="procedureHeading" xmlns="">To build and install the Data Mining Web Controls</h4><div id="procedureSectionEBBLBHA" class="section" xmlns=""><ol><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">In Windows Explorer, locate C:\Program Files\Microsoft SQL Server\100\Samples\Analysis Services\DataMining\Data Mining Web Controls, and then double-click the WebControls.sln file.</p>
              <p xmlns="">The WebControls solution opens in Visual Studio.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">On the <b>Build</b> menu, click <b>Configuration Manager</b>.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">In the Configuration Manager dialog box, select the <b>Build</b> check boxes for both the DMHTMLViewersSetup and WebControls projects (if not already selected).</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">On the <b>Build</b> menu, click <b>Rebuild Solution</b>.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">In Windows Explorer, locate C:\Program Files\Microsoft SQL Server\100\Samples\Analysis Services\DataMining\Data Mining Web Controls\WebControlsSetup\Debug, and then double-click the setup.exe file.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">In the Microsoft SQL Server Data Mining HTML Controls Setup Wizard, click <b>Next</b>, and then <b>Next</b> again to start the installation of the controls.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">After the controls have been installed, click <b>Next</b> and then <b>Finish</b> to complete the wizard.</p>
              <p xmlns="">After the wizard finishes, the following folders will have been added to the server:</p>
              <ul xmlns=""><li>
                  The C:\Program Files\Microsoft.AnalysisServices.DataMiningHtmlViewers folder that contains the library, the source code for the controls, and this document.<br />
                </li><li>
                  The C:\Inetpub\wwwroot\aspnet_client\microsoft_analysisservices_datamininghtmlviewers folder that contains client-side scripts and images used by the Data Mining Web Controls. This folder is also Web shared.<br />
                </li></ul>
            </content>
          </li></ol></div>
    </content></div><h1 class="heading">Adding the Controls to an Application</h1><div id="sectionSection4" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">After building the sample, you can use the data mining controls. To use these controls, you must first create an ASP.NET Web application, add the controls that you want to the application, and then configure the controls that have been added.</p>
      <h4 class="procedureHeading" xmlns="">To add the data mining controls to a Web application</h4><div id="procedureSectionEBBJBHA" class="section" xmlns=""><ol><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">In Microsoft Visual Studio .NET, on the <b>File</b> menu, and click <b>New Web Site</b>.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">In the <b>New Web Site</b> dialog box, select <b>ASP.NET Web site</b>, select Microsoft Visual Basic or Microsoft C# as the language, and then click <b>OK</b>.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">If Toolbox is not currently visible, on the <b>View</b> menu, click <b>Toolbox</b>.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">In Toolbox, expand the category to which you want the data mining controls (for example, expand <b>Standard)</b>, right-click within that category, and then click <b>Choose Items</b>.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">In the <b>Choose Toolbox Items</b> dialog box, locate and open the C:\Program Files\Microsoft.AnalysisServices.DataMiningHtmlViewers\Microsoft.AnalysisServices.DataMiningHTMLViewers.dll file.</p>
              <p xmlns="">The three data mining controls appear in the list of components and their check boxes have automatically been selected.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">Click <b>OK</b>.</p>
              <p xmlns="">The three data mining controls should now appear in the selected category within Toolbox.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">To add a data mining control to the application, drag the control from Toolbox onto the Web form design page.</p>
              <p xmlns="">After you add a data mining control on the Web form page, there are some control properties that you must set and some that are optional. The next section describes how to set these properties.</p>
            </content>
          </li></ol></div>
    </content></div><h1 class="heading">Setting Control Properties</h1><div id="sectionSection5" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">A data mining Web control has two categories of properties:</p>
      <ul xmlns=""><li>
          The <b>Data Mining Content</b> category contains properties that define the model to be displayed. Among these properties, there are properties that must be set to use the control. The following table lists the properties shared by all the Web controls and indicates which of these properties must be set for all controls.<br />
          <table width="100%" cellspacing="0" cellpadding="0" border="1" style="background-color: #CCCCCC;"><tr>
                <th>
                  Property
                </th>
                <th>
                  Type
                </th>
                <th>
                  Default
                </th>
                <th>
                  Requires changes
                </th>
              </tr><tr>
              <td>
                <p>Server</p>
              </td>
              <td>
                <p>string</p>
              </td>
              <td>
                <p>Localhost</p>
              </td>
              <td>
                <p>Yes</p>
              </td>
            </tr><tr>
              <td>
                <p>Database</p>
              </td>
              <td>
                <p>string</p>
              </td>
              <td>
                <p>&lt;empty&gt;</p>
              </td>
              <td>
                <p>Yes</p>
              </td>
            </tr><tr>
              <td>
                <p>Model</p>
              </td>
              <td>
                <p>string</p>
              </td>
              <td>
                <p>&lt;empty&gt;</p>
              </td>
              <td>
                <p>Yes</p>
              </td>
            </tr><tr>
              <td>
                <p>Connection</p>
              </td>
              <td>
                <p>System.Data.OleDb.OleDbConnection</p>
              </td>
              <td>
                <p>(none)</p>
              </td>
              <td>
                <p>No</p>
              </td>
            </tr></table>
          In addition to these common controls, the DMDecisionTreeViewer control has additional <b>Data Mining Content</b> properties that must be set. For more information about these additional properties, see the section that describes how to set the properties for the DMDecisionTreeViewer control.<br />
        </li><li>
          The <b>Data Mining Layout</b> category contains graphical properties for the controls. As the graphical representation for each data mining Web controls is different, the graphical properties associated with the controls vary correspondingly. You can use the default settings for these properties as is.<br />
        </li></ul>
      <p xmlns="">To set the properties for a control, you use can use the Properties window in Visual Studio. If you cannot see the Properties window, right-click the control, and then click <b>Properties</b>. Also, to easily access the properties of the control, in Properties, select the Categorized view.</p>
      <div class="alert" xmlns=""><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Note: </th></tr><tr><td>
        Also, you can set these values programmatically in the code shown on the Source tab.<p />
      </td></tr></table><p /></div>
    </content><sections xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <h3 class="subHeading" xmlns="">Setting DMClusterView Control Properties</h3><div class="subSection" xmlns=""><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
          <p xmlns="">You can use the DMClusterViewer control to display the content of models created using the Microsoft Clustering algorithm. Not as rich as the cluster viewer found in Business Intelligence Development Studio, the cluster viewer for this control only supports cluster characteristics and cluster discrimination.</p>
          <p xmlns="">The DMClusterViewer control has properties in the <b>Data Mining Content</b> category that must be set and optional properties in the <b>Data Mining Layout</b> category whose default settings can be used as is.</p>
        </content><sections xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
          <h4 class="subHeading" xmlns="">Setting the Data Mining Content Properties for the DMClusterView Control</h4><div class="subSection" xmlns=""><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">The properties in the <b>Data Mining Content</b> category that must be set for the DMClusterView control are those properties shared by all the Web controls—<b>Server</b>, <b>Database</b>, and <b>Model</b>. If you want, you can also change the <b>Connection</b> property for this control.</p>
              <h4 class="procedureHeading" xmlns="">To set the properties required by the DMClusterView control</h4><div id="procedureSectionEBBDBFBHBHA" class="section" xmlns=""><ol><li>
                    <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                      <p xmlns="">In Visual Studio, on the design view for the Web form, select the DMClusterView control.</p>
                    </content>
                  </li><li>
                    <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                      <p xmlns="">In the Properties window, in the <b>Data Mining Content</b> category, set the following properties:</p>
                      <ul xmlns=""><li>
                          Set the <b>Server</b> property to the name of the computer on which Analysis Services is installed. <br />
                        </li><li>
                          Set the <b>Database</b> property to the name of the catalog that contains the model to be displayed. For this sample, the name of the database that contains the mining models is <b>Adventure Works DW</b>.<br />
                        </li><li>
                          Set the <b>Model</b> property to the mining model to be loaded in the viewer.<br />
                        </li><li>
                          (Optional) Set the <b>Connection</b> property to an existing OLE DB connection (that is, a System.Data.OleDb.OleDbConnection object). This allows the control to share a connection with the application instead of creating a new one.<br />
                        </li></ul>
                    </content>
                  </li></ol></div>
            </content></div>
          <h4 class="subHeading" xmlns="">Setting the Data Mining Layout Properties for the DMClusterView Control</h4><div class="subSection" xmlns=""><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">The following table lists the graphical properties associated with the DMClusterView control. Changing the default setting for these graphical properties is optional.</p>
              <table width="100%" cellspacing="0" cellpadding="0" border="1" style="background-color: #CCCCCC;" xmlns=""><tr>
                    <th>
                      Property
                    </th>
                    <th>
                      Type
                    </th>
                    <th>
                      Default
                    </th>
                    <th>
                      Requires changes
                    </th>
                  </tr><tr>
                  <td>
                    <p>BarColor</p>
                  </td>
                  <td>
                    <p>System.Drawing.Color</p>
                  </td>
                  <td>
                    <p>Navy</p>
                  </td>
                  <td>
                    <p>No</p>
                  </td>
                </tr><tr>
                  <td>
                    <p>ViewerMode</p>
                  </td>
                  <td>
                    <p>GridViewerMode</p>
                  </td>
                  <td>
                    <p>Discrimination</p>
                  </td>
                  <td>
                    <p>No</p>
                  </td>
                </tr></table>
              <h4 class="procedureHeading" xmlns="">To set the graphical properties of the DMClusterView control</h4><div id="procedureSectionEBBBBFBHBHA" class="section" xmlns=""><ol><li>
                    <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                      <p xmlns="">In Visual Studio, on the design view for the Web form, select the DMClusterView control.</p>
                    </content>
                  </li><li>
                    <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                      <p xmlns="">In the Properties window, in the <b>Data Mining Layout</b> category, set the following properties:</p>
                    </content>
                  </li></ol></div>
            </content></div>
        </sections></div>
      <h3 class="subHeading" xmlns="">Setting DMNaiveBayesViewer Control Properties</h3><div class="subSection" xmlns=""><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
          <p xmlns="">You can use the DMNaiveBayesViewer control to display the content of mining models created using the Microsoft Naive Bayes algorithm. The DMNaiveBayesViewer control only supports attribute characteristics and discrimination between attribute values.</p>
        </content><sections xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
          <h4 class="subHeading" xmlns="">Setting the Data Mining Content Properties for the DMNaiveBayesViewer Control</h4><div class="subSection" xmlns=""><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">The properties in the <b>Data Mining Content</b> category that must be set for the DMNaiveBayesViewer control are those properties shared by all the Web controls—<b>Server</b>, <b>Database</b>, and <b>Model</b>. If you want, you can also change the <b>Connection</b> property for this control.</p>
              <h4 class="procedureHeading" xmlns="">To set the properties required by the DMNaiveBayesViewer control</h4><div id="procedureSectionEBBDBDBHBHA" class="section" xmlns=""><ol><li>
                    <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                      <p xmlns="">In Visual Studio, on the design view for the Web form, select the DMNaiveBayesViewer control.</p>
                    </content>
                  </li><li>
                    <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                      <p xmlns="">In the Properties window, in the <b>Data Mining Content</b> category, set the following properties:</p>
                      <ul xmlns=""><li>
                          Set the <b>Server</b> property to the name of the computer on which Analysis Services is installed. <br />
                        </li><li>
                          Set the <b>Database</b> property to the name of the catalog that contains the model to be displayed. For this sample, the name of the database that contains the mining models is <b>Adventure Works DW</b>.<br />
                        </li><li>
                          Set the <b>Model</b> property to the mining model to be loaded in the viewer.<br />
                        </li><li>
                          (Optional) Set the <b>Connection</b> property to an existing OLE DB connection (that is, a System.Data.OleDb.OleDbConnection object). This allows the control to share a connection with the application instead of creating a new one.<br />
                        </li></ul>
                    </content>
                  </li></ol></div>
            </content></div>
          <h4 class="subHeading" xmlns="">Setting the Data Mining Layout Properties for the DMNaiveBayesViewer Control</h4><div class="subSection" xmlns=""><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">The following table lists the graphical properties associated with the DMNaiveBayesViewer control. Changing the default setting for these graphical properties is optional.</p>
              <table width="100%" cellspacing="0" cellpadding="0" border="1" style="background-color: #CCCCCC;" xmlns=""><tr>
                    <th>
                      Property
                    </th>
                    <th>
                      Type
                    </th>
                    <th>
                      Default
                    </th>
                    <th>
                      Requires changes
                    </th>
                  </tr><tr>
                  <td>
                    <p>BarColor</p>
                  </td>
                  <td>
                    <p>System.Drawing.Color</p>
                  </td>
                  <td>
                    <p>Navy</p>
                  </td>
                  <td>
                    <p>No</p>
                  </td>
                </tr><tr>
                  <td>
                    <p>ViewerMode</p>
                  </td>
                  <td>
                    <p>GridViewerMode</p>
                  </td>
                  <td>
                    <p>Discrimination</p>
                  </td>
                  <td>
                    <p>No</p>
                  </td>
                </tr></table>
              <h4 class="procedureHeading" xmlns="">To set the properties specific to the DMNaiveBayesViewer control</h4><div id="procedureSectionEBBBBDBHBHA" class="section" xmlns=""><ol><li>
                    <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                      <p xmlns="">In Visual Studio, on the design view for the Web form, select the DMNaiveBayesViewer control.</p>
                    </content>
                  </li><li>
                    <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                      <p xmlns="">In the Properties window, in the <b>Data Mining Layout</b> category, set the following properties:</p>
                    </content>
                  </li></ol>
                  <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                  </content>
                </div>
            </content></div>
        </sections></div>
      <h3 class="subHeading" xmlns="">Setting DMDecisionTreeViewer Control Properties</h3><div class="subSection" xmlns=""><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
          <p xmlns="">The DMDecisionTreeViewer control can be used to display the content of models created using the Microsoft Decision Trees algorithm. The DMDecisionTreesViewer control can work in following two modes:</p>
          <dl xmlns=""><dt>Tree mode</dt><dd>
              <p>Displays a complete decision tree and allows the following operations:</p>
              <ul><li>
                  Expanding and collapsing of nodes.<br />
                </li><li>
                  Following the splits in decision trees.<br />
                </li><li>
                  Shading based on support for a state of the predicted attribute.<br />
                </li><li>
                  Inspecting, by way of a ToolTip, of the distributions for a specific node.<br />
                </li></ul>
            </dd></dl><dl xmlns=""><dt>Node Details mode</dt><dd>
              <p>Provides details about a specific node in the tree, identified by the NODE_UNIQUE_NAME field from the MINING_MODEL_CONTENT schema. The Node Details view is different if the attribute is discrete / discretized (classification) or continuous (regression).</p>
            </dd></dl>
        </content><sections xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
          <h4 class="subHeading" xmlns="">Setting the Data Mining Content Properties for the DMDecisionTreeViewer Control</h4><div class="subSection" xmlns=""><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">In addition to the properties in the <b>Data Mining Content</b> category that are shared by all the Web controls—<b>Server</b>, <b>Database</b>, and <b>Model</b>, you must set the properties listed in the following table for the DMDecisionTreeViewer control</p>
              <table width="100%" cellspacing="0" cellpadding="0" border="1" style="background-color: #CCCCCC;" xmlns=""><tr>
                    <th>
                      Property
                    </th>
                    <th>
                      Type
                    </th>
                    <th>
                      Default
                    </th>
                    <th>
                      Requires changes
                    </th>
                  </tr><tr>
                  <td>
                    <p>TargetNode</p>
                  </td>
                  <td>
                    <p>String</p>
                  </td>
                  <td>
                    <p>&lt;empty&gt;</p>
                  </td>
                  <td>
                    <p>yes</p>
                  </td>
                </tr><tr>
                  <td>
                    <p>TargetTree</p>
                  </td>
                  <td>
                    <p>String</p>
                  </td>
                  <td>
                    <p>&lt;empty&gt;</p>
                  </td>
                  <td>
                    <p>yes</p>
                  </td>
                </tr></table>
              <p xmlns="">
                <b>Note</b>   Either the <b>TargetTree</b> property or the <b>TargetNode</b> property must be set. Both of these properties cannot be &lt;empty&gt;.</p>
              <h4 class="procedureHeading" xmlns="">To set the properties required by the DMDecisionTreeViewer control</h4><div id="procedureSectionEBBDBBBHBHA" class="section" xmlns=""><ol><li>
                    <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                      <p xmlns="">In Visual Studio, on the design view for the Web form, select the DMDecisionTreeViewer control.</p>
                    </content>
                  </li><li>
                    <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                      <p xmlns="">In the Properties window, in the <b>Data Mining Content</b> category, set the following properties:</p>
                      <ul xmlns=""><li>
                          Set the <b>Server</b> property to the name of the computer on which Analysis Services is installed. <br />
                        </li><li>
                          Set the <b>Database</b> property to the name of the catalog that contains the model to be displayed. For this sample, the name of the database that contains the mining models is <b>Adventure Works DW</b>.<br />
                        </li><li>
                          Set the <b>Model</b> property to the mining model to be loaded in the viewer.<br />
                        </li><li>
                          (Optional) Set the <b>Connection</b> property to an existing OLE DB connection (that is, a System.Data.OleDb.OleDbConnection object). This allows the control to share a connection with the application instead of creating a new one.<br />
                        </li><li>
                          Set the <b>TargetTree</b> property to the tree to be displayed in the control. You identify this tree by the name of the predictable attribute. To retrieve the names of predictable attributes in a model, use a query similar to the following one:<br />
                          <div class="code"><span codeLanguage="other"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left" /></tr><tr><td colspan="2"><pre>"SELECT ATTRIBUTE_NAME FROM [Model].CONTENT WHERE NODE_TYPE=2"</pre></td></tr></table></span></div>
                          <div class="alert"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Note: </th></tr><tr><td>
                            If you use the DMDecisionTreeViewer control in Tree mode, you must set the <b>TargetTree</b> property.<p />
                          </td></tr></table><p /></div>
                        </li><li>
                          Set the <b>TargetNode</b> property to the NODE_UNIQUE_NAME value for the node to be displayed. To obtain a list of nodes in the tree, use a query similar to the following one:<br />
                          <div class="code"><span codeLanguage="other"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left" /></tr><tr><td colspan="2"><pre>"SELECT NODE_UNIQUE_NAME, ATTRIBUTE_NAME FROM [Model].CONTENT WHERE NODE_TYPE=3 OR NODE_TYPE=4"</pre></td></tr></table></span></div>
                          <div class="alert"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Note: </th></tr><tr><td>
                            If you use the DMDecisionTreeViewer control in Node Details mode, you must set the <b>TargetNode</b> property.<p />
                          </td></tr></table><p /></div>
                        </li></ul>
                    </content>
                  </li></ol>
                  <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                  </content>
                </div>
            </content></div>
          <h4 class="subHeading" xmlns="">Setting the Data Mining Layout Properties for the DMDecisionTreeViewer Control</h4><div class="subSection" xmlns=""><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">The following table lists the graphical properties associated with the DMDecisionTreeViewer control. Changing the default setting for these graphical properties is optional.</p>
              <table width="100%" cellspacing="0" cellpadding="0" border="1" style="background-color: #CCCCCC;" xmlns=""><tr>
                    <th>
                      Property
                    </th>
                    <th>
                      Type
                    </th>
                    <th>
                      Default
                    </th>
                    <th>
                      Requires changes
                    </th>
                  </tr><tr>
                  <td>
                    <p>ViewType</p>
                  </td>
                  <td>
                    <p>TreeViewType</p>
                  </td>
                  <td>
                    <p>Tree</p>
                  </td>
                  <td>
                    <p>No</p>
                  </td>
                </tr><tr>
                  <td>
                    <p>ShowToolbar</p>
                  </td>
                  <td>
                    <p>Boolean</p>
                  </td>
                  <td>
                    <p>True</p>
                  </td>
                  <td>
                    <p>No</p>
                  </td>
                </tr><tr>
                  <td>
                    <p>OverflowBehavior</p>
                  </td>
                  <td>
                    <p>TreeOverflowBehaviorType</p>
                  </td>
                  <td>
                    <p>Visible</p>
                  </td>
                  <td>
                    <p>No</p>
                  </td>
                </tr><tr>
                  <td>
                    <p>NodeLowDensity</p>
                  </td>
                  <td>
                    <p>System.Drawing.Color</p>
                  </td>
                  <td>
                    <p>White</p>
                  </td>
                  <td>
                    <p>No</p>
                  </td>
                </tr><tr>
                  <td>
                    <p>NodeHighDensity</p>
                  </td>
                  <td>
                    <p>System.Drawing.Color</p>
                  </td>
                  <td>
                    <p>Navy</p>
                  </td>
                  <td>
                    <p>No</p>
                  </td>
                </tr><tr>
                  <td>
                    <p>MaxVisibleHistograms</p>
                  </td>
                  <td>
                    <p>int</p>
                  </td>
                  <td>
                    <p>6</p>
                  </td>
                  <td>
                    <p>No</p>
                  </td>
                </tr><tr>
                  <td>
                    <p>LineStrokeWidth</p>
                  </td>
                  <td>
                    <p>int</p>
                  </td>
                  <td>
                    <p>1</p>
                  </td>
                  <td>
                    <p>No</p>
                  </td>
                </tr><tr>
                  <td>
                    <p>LineStrokeColor</p>
                  </td>
                  <td>
                    <p>System.Drawing.Color</p>
                  </td>
                  <td>
                    <p>Black</p>
                  </td>
                  <td>
                    <p>No</p>
                  </td>
                </tr><tr>
                  <td>
                    <p>HistogramTooltipEvent</p>
                  </td>
                  <td>
                    <p>TreeTooltipEvent</p>
                  </td>
                  <td>
                    <p>OnMouseOverEvent</p>
                  </td>
                  <td>
                    <p>No</p>
                  </td>
                </tr><tr>
                  <td>
                    <p>HistogramText</p>
                  </td>
                  <td>
                    <p>System.Drawing.Color</p>
                  </td>
                  <td>
                    <p>Black</p>
                  </td>
                  <td>
                    <p>No</p>
                  </td>
                </tr><tr>
                  <td>
                    <p>HistogramBackground</p>
                  </td>
                  <td>
                    <p>System.Drawing.Color</p>
                  </td>
                  <td>
                    <p>Beige</p>
                  </td>
                  <td>
                    <p>No</p>
                  </td>
                </tr></table>
              <h4 class="procedureHeading" xmlns="">To set the properties specific to the DMDecisionTreeViewer control</h4><div id="procedureSectionEBBBBBBHBHA" class="section" xmlns=""><ol><li>
                    <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                      <p xmlns="">In Visual Studio, on the design view for the Web form, select the DMDecisionTreeViewer control.</p>
                    </content>
                  </li><li>
                    <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                      <p xmlns="">In the Properties window, in the <b>Data Mining Layout</b> category, set the following properties:</p>
                    </content>
                  </li></ol></div>
            </content></div>
        </sections></div>
    </sections></div><h1 class="heading">Enforcing Impersonation</h1><div id="sectionSection6" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">When a user opens your page, the controls are instantiated. The controls use an OLE DB connection to access the server that is running Analysis Services and the data mining models. By default, ASP.NET applications run under the set of credentials of a specific user, &lt;MACHINE\ASPNET&gt;, which has limited permissions. This set of permissions is not enough for accessing the data mining models.</p>
      <p xmlns="">An easy and safe way to solve the limited permissions of the &lt;MACHINE\ASPNET&gt; user is to enforce impersonation of the Web user in the ASP.NET application. To enforce impersonation, you must to disable anonymous access for the application that you are developing. After you disable anonymous access, your Web application will impersonate the Web client’s user and access the Analysis Services instance using that user’s credentials. For more information about disabling anonymous access for ASP.NET applications, see the documentation that is included with Visual Studio and IIS.</p>
      <p xmlns="">There are alternative ways of solving the access problem caused by the &lt;MACHINE\ASPNET&gt; user:</p>
      <ul xmlns=""><li>
          Impersonate a specific user for all the requests. (For more information,see the article on &lt;identity&gt; in web.config in the MSDN library that is included with Visual Studio .NET).<br />
        </li><li>
          Add data mining permissions for the &lt;MACHINE\ASPNET&gt; user in the Analysis Services instance. Permissions for Read access and ReadDefinition are required for the database, the mining structure, and the mining model to be displayed in the Web controls.<br />
          <div class="alert"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Note: </th></tr><tr><td>
            The controls will be unable to access the Analysis Services instance if the security permissions are not correctly configured using one of the previously described methods.<p />
          </td></tr></table><p /></div>
        </li></ul>
    </content></div><h1 class="heading">Comments</h1><div id="sectionSection7" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">If an error occurs when rendering a control, the error message appears in red on the page.</p>
    </content></div><h1 class="heading">See Also</h1><div id="seeAlsoSection" class="section" name="collapseableSection"><h4 class="subHeading">Tasks</h4><a href="html/634f32ee-4446-4044-848b-d6e679931aaa.htm">Readme_SQL Server Plug-In Algorithms</a><br /><h4 class="subHeading">Other Resources</h4><b>Plugin Algorithms</b><br /><br />
		<h4 class="subHeading">
			Help and Information
		</h4>
		<b>
			
			Getting SQL Server 2008 Assistance
		</b>
	</div><!--[if gte IE 5]>
			<tool:tip element="seeAlsoToolTip" avoidmouse="false"/><tool:tip element="languageFilterToolTip" avoidmouse="false"/><tool:tip element="roleInfoSpan" avoidmouse="false"/>
		<![endif]--></div>
      <div id="footer">
			
			© 2008 Microsoft Corporation. All rights reserved.
		</div>
    </div>
  </body>
</html>